@use '/@/theme/mixins/function' as *;
@use 'sass:map';

$next-colors: () !default;
$next-colors: map.deep-merge(
  (
    // 顶栏背景色
    'header-bg': #fff,
    // 左侧菜单栏背景色
    'aside-menu-bg': #fff
  ),
  $next-colors
);

$next-margins: () !default;
$next-margins: map.deep-merge(
  (
    // 备用
    'extra-large': 24px,
    // 页面模块之间边距
    'large': 20px,
    // 备用
    'medium': 16px,
    // 页面模块内元素之间边距
    'small': 12px,
    // 用于页面两侧边距
    'extra-small': 10px
  ),
  $next-margins
);

@mixin set-css-var-map($map, $baseName: '') {
  @if ($baseName != '') {
    $baseName: $baseName + '-';
  }
  @each $k in map-keys($map) {
    #{getCssVarName('next-' + $baseName  + $k)}: map.get($map, $k);
  }
}

:root {
  // user组件icon的hover背景色
  #{getCssVarName('next-color-user-hover')}: getCssVar('color-primary-light-9');

  @include set-css-var-map($next-colors);
  @include set-css-var-map($next-margins, 'margin');

  // tags-view字体大小
  #{getCssVarName('next-tags-view-font-size')}: 16px;

  // tags-view高度
  #{getCssVarName('next-tags-view-height')}: 48px;

  // 页面标题大小
  #{getCssVarName('next-page-title-size')}: 20px;
}
